home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / iwf12.zip / IWF.H < prev    next >
C/C++ Source or Header  |  1994-01-22  |  4KB  |  108 lines

  1. #include "c:\iwf\kernel\kernel.h"
  2.  
  3. //---------------------------------------
  4. //Defines.
  5. //---------------------------------------
  6. #define  NO   0
  7. #define  YES  1
  8.  
  9. #define  nMFBUFFERS 4                  // # of memory frame buffers
  10. #define  nXFBUFFERS 4                  // # of hardware frame buffers
  11. #define  nMODULES   16                 // # of user modules
  12.  
  13. #define  GAIN       59                 // Default camera input gain
  14. #define  OFFSET     19                 // Default camera input offset
  15. #define  FOCAL      16                 // Default camera focal length
  16.  
  17. #define  GWW_SCALE  0                  // Window word offset for scale value
  18. #define  GWW_IMAGE  2                  // Window word offset for image pointer
  19.  
  20. // Macro defines for getting extra window information
  21. #define GetImage(hWnd)         (IMAGE *)GetWindowWord(hWnd,GWW_IMAGE)
  22. #define GetScale(hWnd)         (WORD   )GetWindowWord(hWnd,GWW_SCALE)
  23. #define SetImage(hWnd,image)   SetWindowWord(hWnd,GWW_IMAGE,(WORD)image)
  24. #define SetScale(hWnd,scale)   SetWindowWord(hWnd,GWW_SCALE,(WORD)scale)
  25. #define RefreshImage(hWnd)     InvalidateRect(hWnd,NULL,FALSE)
  26.  
  27. void SetUndoImage(IMAGE *image);
  28. IMAGE *GetUndoImage(void);
  29.  
  30. // Geometric Procedures.
  31. void iwf_Scale(void);
  32. void iwf_Flip_Horz(void);
  33. void iwf_Flip_Vert(void);
  34. void iwf_Rotate(int dir);
  35.  
  36.  
  37. // CONTROL.H (control procedure declarations)
  38.  
  39. void Status(HWND hWndParent);
  40. void Convolve(HWND hWndParent);
  41.  
  42. BOOL FAR PASCAL _export DP_About  (HWND hDlg,WORD wMsg,WORD wParam,LONG lParam);
  43. BOOL FAR PASCAL _export DP_Process(HWND hDlg,WORD wMsg,WORD wParam,LONG lParam);
  44. BOOL FAR PASCAL _export DP_Filters(HWND hDlg,WORD wMsg,WORD wParam,LONG lParam);
  45. BOOL FAR PASCAL _export DP_Convolve(HWND hDlg,WORD wMsg,WORD wParam,LONG lParam);
  46. BOOL FAR PASCAL _export DP_LUT    (HWND hDlg,WORD wMsg,WORD wParam,LONG lParam);
  47. BOOL FAR PASCAL _export DP_Aspect (HWND hDlg,WORD wMsg,WORD wParam,LONG lParam);
  48. BOOL FAR PASCAL _export DP_Profiler(HWND hDlg,WORD wMsg,WORD wParam,LONG lParam);
  49.  
  50.  
  51. // Windows extensions.
  52. void MessageStop(char *format, ...);
  53. void wputs(HDC hDC,char *sz);
  54. void wprintf(HDC hDC,char *format, ...);
  55. void MoveRel(HDC hDC,int dx,int dy);
  56. void ToggleMenuState(HWND hWnd,WORD id,BOOL *state);
  57. BOOL DrawBitmap(HDC hDC,int x,int y,HANDLE hBM);
  58. BOOL PickColor(HWND hWndOwner,COLORREF *cr);
  59. long fstr(FILE *fp,char *string);
  60. int  CallDialogBox(HWND hWnd,FARPROC lpProcName,LPSTR lpResName);
  61. HPALETTE CreateLogPalette(int size);
  62.  
  63.  
  64. HWND CreateImageWindow(HWND hWndParent);
  65.  
  66. int  FileNew   (HWND hWnd);
  67. int  FileOpen  (HWND hWnd);
  68. int  FileSave  (HWND hWnd);
  69. int  FileSaveAs(HWND hWnd);
  70. int  FilePrint (HWND hWnd);
  71.  
  72. extern IMAGE *_undo;                   // Undo image buffer pointer.
  73. extern char  _cwdImage[80];            // Image working directory
  74.  
  75. #define  MAXIMAGES  10                 // Maximum number of images displayable.
  76. #define  MAXMODULES 10                 // Maximum number of modules displayable.
  77. #define  MAXTOOLS    8                 // Maximum number of buttons displayable.
  78.  
  79. #define GetSourceWindow() hWndSrc
  80. #define GetTargetWindow() hWndDst
  81. #define GetModuleWindow() hWndMod
  82. #define GetStatusWindow() hWndStatus
  83.  
  84. /*
  85. Client rectangles for use with mouse click procedures
  86. and screen update. The coordinates of these rectangles
  87. vary depending on the screen size.
  88. */
  89.  
  90. extern HWND _hWndImage[MAXIMAGES];      // Handles to the images.
  91. extern HWND _hWndModule[MAXMODULES];    // Window handles for images.
  92. extern HWND hWndSrc;                   // Handle to current source image.
  93. extern HWND hWndDst;                   // Handle to current destination image.
  94. extern HWND hWndMod;                   // Handle to current module.
  95. extern HWND hWndStatus;                // Handle to status bar.
  96.  
  97. extern HPALETTE hPalMain;              // Handle to logical palette
  98.  
  99. extern PALETTEENTRY peGray  [64];
  100. extern PALETTEENTRY pePseudo[64];
  101. extern PALETTEENTRY peUser [128];
  102. extern PALETTEENTRY peMain [256];
  103.  
  104. extern COLORREF crDlg;
  105.  
  106.  
  107.  
  108.